package com.lw.service;

import com.lw.error.BusinessException;
import com.lw.service.model.UserModel;

/**
 * Created by IntelliJ IDEA
 *
 * @Author L1W31
 * @Version 1.0
 * @Description 用户模块接口
 */

public interface UserService {

    // 通过用户ID获取用户对象的方法
    UserModel getUserById(Integer id);

    void register(UserModel userModel) throws BusinessException;

    //通过缓存获取用户对象
    UserModel getUserByIdInCache(Integer id);

    /**
     * @param telephone 用户注册手机
     * @param encrptPassword 用户加密后的密码
     * @throws BusinessException
     */
    UserModel validationLogin(String telephone, String encrptPassword) throws BusinessException;
}
